﻿<%@ Control Language="C#" Inherits="Web.Control.WWW.Wiki.Edit" %>
<%@ Register TagPrefix="st" TagName="JsFileTree" Src="~/knowledge/JsFileTree.ascx" %>
<%@ Register TagPrefix="st" TagName="JsImageBrowser" Src="~/knowledge/JsImageBrowser.ascx" %>
<%@ Import Namespace="BLF.WWW_WWW.Wiki" %>
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<asp:Literal ID="lblStrings" runat="server"></asp:Literal>
				<script type="text/javascript">
				<!-- 
					var txtContent = "<%=txtContent.ClientID %>";
					var SpecialTagsDiv = "SpecialTagsDiv";
					var PreviewDivExternal = "PreviewDivExternal";
					var txtPageName = "<%=txtPageName.ClientID %>";
					var txtTitle = "<%=txtTitle.ClientID %>";
					var btnSave = "<%=btnSave.ClientID %>";
					var btnSaveAndContinue = "<%=btnSaveAndContinue.ClientID %>";
					var btnCancel = "<%=btnCancel.ClientID %>";
					var btnNewCategory = "aaa";
				// -->
				</script>

				<div id="BackgroundDiv" style="display: none; width: 100%; background-color:#CCCCCC; border: 1px #eee solid;opacity: 0.5; filter: alpha(opacity=50); -moz-opacity: 0.50; z-index: 500;">
				</div>
				<div id="ImageDialogDiv" style="position: absolute; left: 0px; top: 0px; display: none;width: 618px; height: 360px; background-color: #FFFFFF; z-index: 1000;">
					<div style="background-color: #e2007b; color: #fff; padding: 3px 10px 3px 10px" class="Popup_Title"><%=GetText("WK065")%></div>
					<div id="InputControlsDiv" style="padding: 10px">
						<%=GetText("WK066")%>
						<br />
						<input type="radio" id="RightImageRadio" name="Alignment" checked="true" /><label for="RightImageRadio"><%=GetText("WK067")%></label>
						<input type="radio" id="LeftImageRadio" name="Alignment" /><label for="LeftImageRadio"><%=GetText("WK068")%></label>
						<input type="radio" id="AutoImageRadio" name="Alignment" /><label for="AutoImageRadio"><%=GetText("WK069")%></label>
						<input type="radio" id="InlineImageRadio" name="Alignment" /><label for="InlineImageRadio"><%=GetText("WK070")%></label>
						<br />
						<br />
						<%=GetText("WK071")%>
						<br />
						<input type="text" id="ImageTitleInput" class="common300" />
						<br />
						<br />
						<%=GetText("WK072")%>
						<br />
						<input type="text" id="ImageUrlInput" class="common300" />
						<small><a href="#" onclick="javascript:return __ShowAndSelectInput('ImageUrlInput');"><%=GetText("C0068")%></a></small>
						<br />
						<br />
						<%=GetText("WK074")%>
						<br />
						<input type="text" id="ImageLinkInput" class="common300" />
						<small><a href="#" onclick="javascript:return __ShowAndSelectInput('ImageLinkInput');"><%=GetText("C0068")%></a>- <a href="#" id="PickFileLink" onclick="javascript:return __ToggleFileListForImage();"><%=GetText("WK075")%></a>- <a href="#" id="PickPageLink" onclick="javascript:return __TogglePageListForImage();"><%=GetText("WK076")%></a></small>
						<br />
						<br />
						<div style="text-align: center; border-top: solid 1px #CCCCCC;"><a href="#" onclick="javascript:return __Done(false);"><b><%=GetText("C0045")%></b></a>- <a href="#" onclick="javascript:return __Done(true);"><b><%=GetText("C0056")%></b></a></div>
					</div>
					<st:JsImageBrowser ID="jsimBrowser" runat="server" EnableViewState="false" HrefCommand="#" OnClickCommand="javascript:return __SelectImage('{UP}$');" />
					<br />
					<div id="BrowserControlsDiv" style="display: none; text-align: center;"><a href="#" onclick="javascript:return __Hide(false);"><b><%=GetText("C0045")%></b></a>- <a href="#" onclick="javascript:return __Hide(true);"><b><%=GetText("C0056")%></b></a></div>
				</div>
				<script type="text/javascript">
				<!--
				document.getElementById("ImageBrowserDiv").style["display"] = "none";
				// -->
				</script>
				<div class="title" id="MainTitle">
					<div class="h1"><asp:Literal ID="lblGlobalTitle" runat="server" Text="-- Title --"></asp:Literal></div>
					<div style="display:none"><asp:HiddenField runat="server" ID="hdPage" /><asp:TextBox ID="txtPageName" runat="server" Visible="False" CssClass="common300"></asp:TextBox></div>
				</div>
				<p class="small"><b><asp:Literal ID="lblIpLogged" runat="server" Text="" Visible="False" /></b></p>
				<br />
				<div id="Title" style="margin: 0px;position:relative;">
					<ul class="sort_sel">
						<li id="liOne" class="<%=(hdPage.Value=="0"?"selATags":"unselATags")%>" onclick="javascript:document.getElementById('divP1').style.display='block';document.getElementById('divP2').style.display='none';document.getElementById('<%=hdPage.ClientID%>').value='0';document.getElementById('liOne').className='selATags';document.getElementById('liTwo').className='unselATags';" style="float: left"><span><a href="#"><%=GetText("WK077")%></a></span></li>
						<li id="liTwo" class="<%=(hdPage.Value=="1"?"selATags":"unselATags")%>" onclick="javascript:document.getElementById('divP2').style.display='block';document.getElementById('divP1').style.display='none';document.getElementById('<%=hdPage.ClientID%>').value='1';document.getElementById('liTwo').className='selATags';document.getElementById('liOne').className='unselATags';" style="float: left"><span><a href="#"><%=GetText("WK118")%></a></span></li>
					</ul>
					<div class="clear"></div>
					<div style="position: absolute; z-index:2; right:0; top:0; text-align:right; padding-top:5px"><small><a href="/knowledge/upload.htm" target="_blank"><asp:Literal ID="lblFileManagement" runat="server" /></a></small></div>
				</div>
				<div id="divP1" style="display: <%=(hdPage.Value=="0"?"block":"none")%>; border:1px #ccc solid;padding: 10px; background-color:#fff">
					<h4><%=GetText("WK078")%>:</h4>
					<div class="margin5" style="cursor:pointer; position:relative; height:65px;" >
						<div style="padding:5px">
						<asp:RadioButtonList ID="rblType" runat="server" RepeatColumns="2" RepeatDirection="Horizontal" Width="432px" CellPadding="0" CellSpacing="4">
							<asp:ListItem Value="0" Text=""></asp:ListItem>
							<asp:ListItem Value="1" Text=""></asp:ListItem>
						</asp:RadioButtonList>
						</div>
						<script type="text/javascript">
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[0].style.width="210px";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[0].style.height="54px";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[0].style.backgroundImage="url(/images/bg_wikiedit.gif)";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[0].style.color="#fff";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[1].style.whiteSpace="nowrap";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[1].style.width="210px";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[1].style.height="54px";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[1].style.backgroundImage="url(/images/bg_contributionedit.gif)";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[1].style.color="#fff";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[0].innerHTML += "<span onclick='javascript:document.getElementById(\"MPContainer1Template_rblType_0\").click();'><font size='5'><%=GetText("WK053")%></font><br/>&nbsp;&nbsp;&nbsp;&nbsp;<%=GetText("WK052")%></span>";
						    document.getElementById('MPContainer1Template_rblType').tBodies[0].rows[0].cells[1].innerHTML += "<span onclick='javascript:document.getElementById(\"MPContainer1Template_rblType_1\").click();'><font size='5'><%=GetText("WK054")%></font><br/>&nbsp;&nbsp;&nbsp;&nbsp;<%=GetText("WK055")%></span>";
						</script>
					</div>
					<div class="margin10">
					<h4><%=GetText("C0016")%>:</h4>
						<div class="margin5"><%=GetText("WK105")%>
						<asp:DropDownList ID="ddlL" runat="server"></asp:DropDownList>&nbsp;&nbsp;<%=GetText("C0017")%>
						<asp:DropDownList ID="ddlB" runat="server"></asp:DropDownList></div>
					</div>
					<p>
						<h4><asp:Literal ID="lblTitle" runat="server" Text="" />:</h4>
						<div class="margin5"><asp:TextBox ID="txtTitle" runat="server" CssClass="common450" /></div>
					</p>
					<%--<asp:Literal ID="lblEditNotice" runat="server" />--%>
					<p>
						<span class="black16b"><asp:Literal ID="lblEditComment" runat="server" />: </span><span class="grey12">(<%=GetText("C0043")%>)</span>
						<div class="margin5"><asp:TextBox ID="txtComment" runat="server" CssClass="common450" /></div>
					</p>
					<p><input type="button" value="<%=GetText("WK107")%>" onclick="javascript:document.getElementById('divP2').style.display='block';document.getElementById('divP1').style.display='none';document.getElementById('<%=hdPage.ClientID%>').value='0';document.getElementById('liOne').className='unselATags';document.getElementById('liTwo').className='selATags';" class="button" /></p>
				</div>
				<div id="divP2" style="display: <%=(hdPage.Value=="1"?"block":"none")%>; border: 1px #ccc solid;padding: 10px; background-color:#fff">
					<asp:Panel ID="pnlConcurrentEditing" runat="server" Visible="False">
						<div id="ConcurrentEditingDiv">
							<asp:Literal ID="lblConcurrentEditing" runat="server" Text="" />
							<asp:Literal ID="lblSaveDangerous" runat="server" Visible="False" Text="" />
							<asp:Literal ID="lblSaveDisabled" runat="server" Visible="False" Text="" />
							<asp:Literal ID="lblRefreshLink" runat="server" />
						</div>
						<br />
						<br />
					</asp:Panel>
					<div id="PageListDiv" style="display: none; z-index: 2000;">
						<div style="padding: 0px; margin: 0px; height: 250px; width: 200px; overflow: scroll;"><asp:Literal ID="lblPageList" runat="server" /></div>
					</div>
					<div id="FileListDiv" style="display: none; height: 200px; z-index: 2000; overflow: auto;">
						<div style="margin-bottom: 6px;">
							<input type="checkbox" id="AttachmentChk" name="AttachmentChk" />
							<label for="AttachmentChk">
								<small><asp:Literal ID="lblAttachment" runat="server" /></small>
							</label>
						</div>
						<st:JsFileTree ID="jsftTree" runat="server" EnableViewState="false" HrefCommand="#" OnClickCommand="javascript:return __LinkFile('$');" />
					</div>
					<div id="SnippetListDiv" style="display: none;">
						<div style="padding: 0px; margin: 0px; height: 200px; width: 150px; overflow: auto;"><asp:Literal ID="lblSnippetList" runat="server" /></div>
					</div>
					<ul id="FormatUl">
						<li><a href="#" onclick="javascript:return __Wrap('\'\'\'', '\'\'\'');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Bold")); %>" class="formatlink" id="BoldLink"><% Response.Write(Resources.Messages.Bold); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('\'\'', '\'\'');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Italic")); %>" class="formatlink" id="ItalicLink"><% Response.Write(Resources.Messages.Italic); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('__', '__');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Underlined")); %>" class="formatlink" id="UnderlineLink"><% Response.Write(Resources.Messages.Underlined); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('--', '--');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Striked")); %>" class="formatlink" id="StrikeLink"><% Response.Write(Resources.Messages.Striked); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('==', '==');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("H1")); %>" class="formatlink" id="H1Link"><% Response.Write(Resources.Messages.H1); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('===', '===');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("H2")); %>" class="formatlink" id="H2Link"><% Response.Write(Resources.Messages.H2); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('====', '====');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("H3")); %>" class="formatlink" id="H3Link"><% Response.Write(Resources.Messages.H3); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('=====', '=====');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("H4")); %>" class="formatlink" id="H4Link"><% Response.Write(Resources.Messages.H4); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('<sub>', '</sub>');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Subscript")); %>" class="formatlink" id="SubLink"><% Response.Write(Resources.Messages.Subscript); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('<sup>', '</sup>');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Superscript")); %>" class="formatlink" id="SupLink"><% Response.Write(Resources.Messages.Superscript); %></a></li>
						<li><a href="#" onclick="javascript:return __TogglePageList();" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("PageLink")); %>" class="formatlink" id="PageListLink"><% Response.Write(Resources.Messages.PageLink); %></a></li>
						<li><a href="#" onclick="javascript:return __ToggleFileList();" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("FileLink")); %>" class="formatlink" id="FileLink"><% Response.Write(Resources.Messages.FileLink); %></a></li>
						<li><a href="#" onclick="javascript:return __BuildLink();" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("ExternalLink")); %>" class="formatlink" id="LinkLink"><% Response.Write(Resources.Messages.ExternalLink); %></a></li>
						<li><a href="#" onclick="javascript:return __ToggleImages();" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Image")); %>" class="formatlink" id="ImageLink"><% Response.Write(Resources.Messages.Image); %></a></li>
						<li><a href="#" onclick="javascript:return __ToggleAnchors();" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Anchor")); %>" class="formatlink" id="AnchorLink"><% Response.Write(Resources.Messages.Anchor); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('{{', '}}');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("CodeInline")); %>" class="formatlink" id="CodeLink"><% Response.Write(Resources.Messages.CodeInline); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('{{{{', '}}}}');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("CodeBlock")); %>" class="formatlink" id="PreLink"><% Response.Write(Resources.Messages.CodeBlock); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('(((', ')))');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Box")); %>" class="formatlink" id="BoxLink"><% Response.Write(Resources.Messages.Box); %></a></li>
						<li><a href="#" onclick="javascript:return __Insert('{BR}');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("LineBreak")); %>" class="formatlink" id="BrLink"><% Response.Write(Resources.Messages.LineBreak); %></a></li>
						<li><a href="#" onclick="javascript:return __ToggleSnippetList();" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("InsertSnippet")); %>" class="formatlink" id="SnippetListLink"><% Response.Write(Resources.Messages.InsertSnippet); %></a></li>
						<li><a href="#" onclick="javascript:return __ToggleSpecialTags();" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("SpecialTags")); %>" class="formatlink" id="SpecialTagsLink"><% Response.Write(Resources.Messages.SpecialTags); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('<nowiki>', '</nowiki>');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("NoWiki")); %>" class="formatlink" id="NoWikiLink"><% Response.Write(Resources.Messages.NoWiki); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('<!--', '-->');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Comment")); %>" class="formatlink" id="CommentLink"><% Response.Write(Resources.Messages.Comment); %></a></li>
						<li><a href="#" onclick="javascript:return __Wrap('<esc>', '</esc>');" title="<% Response.Write(Exchanger.ResourceExchanger.GetResource("Escape")); %>" class="formatlink" id="EscapeLink"><% Response.Write(Resources.Messages.Escape); %></a></li>
					</ul>
					<div id="SpecialTagsDiv" style="display: none;"><a href="#" onclick="javascript:return __Insert('{WIKITITLE}');" class="specialtaglink">{WikiTitle}</a> <a href="#" onclick="javascript:return __Insert('{UP}');" class="specialtaglink">{Up}</a> <a href="#" onclick="javascript:return __Insert('{TOP}');" class="specialtaglink">{Top}</a> <a href="#" onclick="javascript:return __Insert('{TOC}');" class="specialtaglink">{TOC}</a> <a href="#" onclick="javascript:return __Insert('{THEMEPATH}');" class="specialtaglink">{ThemePath}</a> <a href="#" onclick="javascript:return __Insert('{RSSPAGE}');" class="specialtaglink">{RSSPage}</a> <a href="#" onclick="javascript:return __Insert('{WIKIVERSION}');" class="specialtaglink">{WikiVersion}</a> <a href="#" onclick="javascript:return __Insert('{MAINURL}');" class="specialtaglink">{MainURL}</a> <a href="#" onclick="javascript:return __Insert('{PAGECOUNT}');" class="specialtaglink">{PageCount}</a> <a href="#" onclick="javascript:return __Insert('{USERNAME}');" class="specialtaglink">{Username}</a> <a href="#" onclick="javascript:return __Insert('{CLEAR}');" class="specialtaglink">{Clear}</a> <a href="#" onclick="javascript:return __Insert('{CLOUD}');" class="specialtaglink">{Cloud}</a> <a href="#" onclick="javascript:return __Insert('{SEARCHBOX}');" class="specialtaglink">{SearchBox}</a>
					</div>
					<div id="AnchorsDiv" style="display: none;"><a href="#" onclick="javascript:return __BuildAnchor();" class="anchorlink"><asp:Literal ID="lblBuildAnchor" runat="server" /></a> <a href="#" onclick="javascript:return __BuildAnchorLink();" class="anchorlink"><asp:Literal ID="lblBuildAnchorLink" runat="server" /></a></div>
					<div id="ImagesDiv" style="display: none;"><a href="#" onclick="javascript:return __BuildImage('left');" class="imagelink"><asp:Literal ID="lblImageLeft" runat="server" /></a> <a href="#" onclick="javascript:return __BuildImage('right');" class="imagelink"><asp:Literal ID="lblImageRight" runat="server" /></a> <a href="#" onclick="javascript:return __BuildImage('auto');" class="imagelink"><asp:Literal ID="lblImageAuto" runat="server" /></a> <a href="#" onclick="javascript:return __BuildImage('');" class="imagelink"><asp:Literal ID="lblImageInline" runat="server" /></a></div>
					<div style="float: right; position: relative; top: 0px; right: 10px;">
						<p class="small" style="text-align: right;"><asp:Literal ID="lblTextareaSize" runat="server" />&nbsp;&nbsp;<a href="#" onclick="javascript:return __IncreaseSize();"><asp:Literal ID="lblBigger" runat="server" /></a> / <a href="#" onclick="javascript:return __DecreaseSize();"><asp:Literal ID="lblSmaller" runat="server" /></a> / <a href="#" onclick="javascript:return __AutoSize();"><asp:Literal ID="lblAuto" runat="server" /></a></p>
					</div>
					<br />
					<br />
					<asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Rows="10" CssClass="common100p"></asp:TextBox>
					<p>
						<span class="black16b"><asp:Literal ID="lblCategories" runat="server" />: </span><span class="grey12">(<%=GetText("C0043")%>)</span>
						<div class="margin5"><asp:CheckBoxList ID="lstCategories" runat="server" RepeatDirection="Horizontal" RepeatColumns="5" RepeatLayout="Table" />
						<div class="margin10"><asp:TextBox ID="txtNewCategory" runat="server" CssClass="common100D" /><br /><span class="grey12"><%=GetText("AS044")%></span></div>
						<br /><asp:Label ID="lblNewCategoryResult" runat="server" /></div>
					</p>
					<p>
						<%if (((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm){%> <asp:Button ID="btnSave" CssClass="button" runat="server" Style="font-weight: bold;" OnClick="btnSave_Click" />
						<asp:Button ID="btnSaveAndContinue" CssClass="buttong" runat="server" OnClick="btnSaveAndContinue_Click" />
						<asp:Button ID="btnPreview" CssClass="buttong" runat="server" OnClick="btnPreview_Click" /><%} %>
						<asp:Button ID="btnCancel" CssClass="buttong" runat="server" OnClick="btnCancel_Click" />
					</p>
				</div>
				<span id="ResultSpan"><asp:Label ID="lblResult" runat="server" /></span>
				<br />
					<a id="Prev"></a>
					<asp:Literal ID="lblPrePreview" runat="server" />
					<asp:Label ID="lblPreview" runat="server" />
					<asp:Literal ID="lblPostPreview" runat="server" />
				<!-- Used to keep the session alive -->
				<asp:Literal ID="lblSessionRefresh" runat="server" />
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>
<script type="text/javascript" src="/knowledge/edit.js"></script>
<asp:Literal ID="lblAjaxEnabler" runat="server" />
<asp:Literal ID="lblUnloadPage" runat="server" />